<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            width: 200px;
            height: 200px;
        }
        .d1{
            background: #ccc;

            /* border 边框 */
            /* border-top: 1px solid red;
            border-right: 2px dashed blue;
            border-bottom: 4px solid green; */
            border: 2px solid red;

            /* padding 内边距 */
            /* padding-left: 10px;
            padding-top: 20px;
            padding-right: 30px;
            padding-bottom: 10px; */
            /* padding: 20px; */
            /* padding: 20px 30px 10px 10px; */
            padding: 20px 30px;

            /* margin 外边距 */
            /* margin-bottom: 50px;
            margin-left: 20px;
            margin-top: 30px; */
            /* margin: 50px; */
            /* 盒子居中：margin:0 auto; */
            margin: 0 auto;

            text-align: center;
        }
        .d2{
            background: #333;
        }
    </style>
</head>
<body>
    <div class="d1">div1</div>
    <div class="d2">div2</div>
</body>
</html>